DC=ldc
SOURCES=src/database.d src/dbnode.d src/downloader.d src/main.d src/nus.d src/nusd.d src/wadpacker.d

main: build

build:
	@echo Building NUSD...
	@$(DC) $(SOURCES) -ofbin/nusd -odobj

install:
	@echo Copying executable to /usr/bin...
	@cp bin/nusd /usr/bin/
	@make clean

objclean:
	@echo Deleting obj dir...
	@rm -rf obj

clean: objclean
	@echo Cleaning up bin dir...
	@rm -rf bin/*
